﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo.Modules.Sales
{
    [NHibernateEntity(Table = "Campaigns")]
    public class Campaign : ITrackable, IStateable
    {
        public Campaign() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [Property]
        public virtual string Name { get; set; }

        [Property]
        public virtual DateTime StartDate { get; set; }

        [Property]
        public virtual DateTime? EndDate { get; set; }

        [Property]
        public virtual State State { get; set; }

        [Property]
        public virtual CampaignType Type { get; set; }

        [BelongsTo(Column = "ID_PriceList")]
        public virtual PriceList PriceList { get; set; }

        [BelongsTo(Column = "ID_Comeback_Campaign")]
        public virtual Campaign Comeback { get; set; }

        [Property]
        public virtual DateTime InsertDate { get; set; }

        [Property]
        public virtual string InsertBy { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }

        [Property]
        public virtual string ModifiedBy { get; set; }
    }

    public enum CampaignType { 
        BAU = 0,
        Campaign = 1
    }
}
